home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok82.lha
/
Mini
/
grammatik.ebnf
< prev
next >
Wrap
Text File
|
1993-08-15
|
577b
|
13 lines
Program -> PROGRAM [ VarDeclaration ] BEGIN {Statement} END .
VarDeclaration -> VAR Identifier { "," Identifier } .
Statement -> Assignment | While | Print .
Assignment -> Identifer "=" Expression .
While -> WHILE Expression DO { Statement } END .
Print -> PRINT Expression
Expression -> [ "+" | "-" ] Factor { ( "+" | "-" ) Factor } .
Factor -> Identifier | Constant .
Identifier -> Letter { Letter } .
Constant -> Digit { Digit } .
Letter -> "a" | .. | "z" | "A" | .. | "Z" .
Digit -> "0" | .. | "9" .